import React, { Component } from 'react'
import Registe from './components/Registe'
import Login from './components/Login'

// 引入withFar函数,并调用,才能拿到Far组件
import withFar from './Far'

// WithLogin和WithRegiste其实是Far组件
const WithLogin = withFar(Login)
const WithRegiste = withFar(Registe)

export default class App extends Component {
  render() {
    return (
      <div>
        {/* 注意:App中要使用的是Far组件 */}
        <WithLogin x={1} y={2} z={3}></WithLogin>
        <WithRegiste></WithRegiste>
      </div>
    )
  }
}
